/**
 * There are code generation
 */
package com.neusoft.lohas.modules.ivm.entity.order;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.neusoft.lohas.common.persistence.IdEntity;

/**
 * 送货单信息Entity
 * @author Jackie.Liu
 * @version 2014-12-23
 */
@Entity
@Table(name = "ivm_delivery_info")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class DeliveryInfo extends IdEntity<DeliveryInfo> {

	private static final long serialVersionUID = 1L;
	private Order order; 	// 订单
	private String deliveryNo;	//送货单号
	private double amount; 	// 送货总金额
	private double refund;  // 退款金额
	private String deliveryMarks;   //送货备注
	private String receiptMarks;   //收货备注
	private String prompt;   //温馨提示
	private Date signTime;   //签收时间
	private String name;   //收货人姓名
	private String phone;   //收货人电话
	private String address;   //收货人地址
	private String timeText; //收货时间信息
	private String startTime;   //收货时间段-开始时间
	private String endTime;   //收货时间段-结束时间
	private String specialMark;		//特殊标识
	private double realAmount; 		//实收金额
	private double realRefund; 		//实退金额
	private Date deliveryDate; 		//送货日期-根据下单日期和选择的时间段计算
	private String deliveryTime;	//送货时间-根据选择的时间段计算

	public DeliveryInfo() {
		super();
	}

	public DeliveryInfo(String id){
		this();
		this.id = id;
	}

	@OneToOne
	@JoinColumn(name = "order_id")
	@NotFound(action = NotFoundAction.IGNORE)
	@NotNull(message="所属订单不能为空")
	@JsonIgnore
	public Order getOrder() {
		return order;
	}

	public void setOrder(Order order) {
		this.order = order;
	}

	public String getDeliveryNo() {
		return deliveryNo;
	}

	public void setDeliveryNo(String deliveryNo) {
		this.deliveryNo = deliveryNo;
	}

	public double getAmount() {
		return amount;
	}

	public void setAmount(double amount) {
		this.amount = amount;
	}

	public double getRefund() {
		return refund;
	}

	public void setRefund(double refund) {
		this.refund = refund;
	}

	public String getDeliveryMarks() {
		return deliveryMarks;
	}

	public void setDeliveryMarks(String deliveryMarks) {
		this.deliveryMarks = deliveryMarks;
	}

	public String getReceiptMarks() {
		return receiptMarks;
	}

	public void setReceiptMarks(String receiptMarks) {
		this.receiptMarks = receiptMarks;
	}

	public String getPrompt() {
		return prompt;
	}

	public void setPrompt(String prompt) {
		this.prompt = prompt;
	}

	public Date getSignTime() {
		return signTime;
	}

	public void setSignTime(Date signTime) {
		this.signTime = signTime;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getTimeText() {
		return timeText;
	}

	public void setTimeText(String timeText) {
		this.timeText = timeText;
	}

	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	public String getSpecialMark() {
		return specialMark;
	}

	public void setSpecialMark(String specialMark) {
		this.specialMark = specialMark;
	}

	public double getRealAmount() {
		return realAmount;
	}

	public void setRealAmount(double realAmount) {
		this.realAmount = realAmount;
	}

	public double getRealRefund() {
		return realRefund;
	}

	public void setRealRefund(double realRefund) {
		this.realRefund = realRefund;
	}

	public Date getDeliveryDate() {
		return deliveryDate;
	}

	public void setDeliveryDate(Date deliveryDate) {
		this.deliveryDate = deliveryDate;
	}

	public String getDeliveryTime() {
		return deliveryTime;
	}

	public void setDeliveryTime(String deliveryTime) {
		this.deliveryTime = deliveryTime;
	}

}


